<template>
	<!-- 轮播图 -->
	<view class="banner">
		<swiper :style="'height:'+h+'px'" :indicator-dots="true" :autoplay="true" :interval="3000" :duration="1000">
			<swiper-item v-for="(item,index) in adList" :key="index" @tap="checkType(item)">
				<view class="swiper-item">
					<image :src="item.app_image" lazy-load="true" mode="widthFix"></image>
				</view>
			</swiper-item>
			
		</swiper>
	</view>
</template>

<script>
	import { checkAdType } from '../common/base.js';
	
	export default {
		data() {
			return {
				
			};
		},
		props: ['adList', 'h'],
		methods: {
			//检查广告类型
			checkType: function(item) {
				checkAdType(item);
			}
		}
	}
</script>

<style scoped>
/* 轮播图开始*/
		.banner swiper{
			width: 100%;
		}
		.banner .swiper-item image{
			width: 750upx;
			height: 312upx;
		}
	/* 轮播图结束 */
</style>
